<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <form action="${ctx}/wechatrobotmedia" id="listForm" method="post" role="form">
                    <div class="box-header">
                        <h3 class="box-title">微信自动回复素材管理</h3>
                    </div><!-- /.box-header -->
                    <div class="box-body table-responsive no-padding">
                        <button id="add" type="button" class="btn btn-default" onclick="openmodal('${ctx}/wechatrobotmedia/edit?robotid=${wechatRobot.id!}')">新增</button>
                        <button type="button" id="deleteButton" disabled="disabled" class="btn btn-default"
                                onclick="deleteAll('${ctx}/wechatrobotmedia/delete')">删除
                        </button>
                        <table class="table table-hover">
                            <tr class="info">
                                <th title=""><input type="checkbox" id="allCheck"></th>
                                <th title="自动回复id">自动回复id</th>
                                <th title="回复内容类型">回复内容类型</th>
                                <th title="回复内容">回复内容</th>
                                <th title="多媒体素材ID">多媒体素材ID</th>
                                <th title="标题">标题</th>
                                <th title="描述">描述</th>
                                <th title="图片连接">图片连接</th>
                                <th title="图文消息链接">图文消息链接</th>
                                <th>编辑</th>
                            </tr>
                            <input type="hidden" id="list" name="list" value="${page.totalRow!}">
                            <#list page.getList() as item>
                                <tr>
                                    <input type="hidden" id="type" name="type" value="${item.reply_content_type!}">
                                    <td><input type="checkbox" name="ids" value="${item.id!}"></td>
                                    <td>${item.wechat_robot_id!}</td>
                                    <td>
                                        <#if item.reply_content_type??&&item.reply_content_type==0>文本</#if>
                                        <#if item.reply_content_type??&&item.reply_content_type==1>图片</#if>
                                        <#if item.reply_content_type??&&item.reply_content_type==2>音频</#if>
                                        <#if item.reply_content_type??&&item.reply_content_type==3>视频</#if>
                                        <#if item.reply_content_type??&&item.reply_content_type==4>音乐</#if>
                                        <#if item.reply_content_type??&&item.reply_content_type==5>图文</#if>
                                    </td>
                                    <td>${item.content_text!}</td>
                                    <td>${item.media_id!}</td>
                                    <td>${item.title!}</td>
                                    <td>${item.description!}</td>
                                    <td>${item.pic_url!}</td>
                                    <td>${item.url!}</td>
                                    <td>
                                        <button type="button" class="btn btn-info"
                                                onclick="openmodal('${ctx}/wechatrobotmedia/edit?id=${item.id}&robotid=${wechatRobot.id!}')">编辑
                                        </button>
                                    </td>
                                </tr>
                            </#list>
                        </table>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>